import socket

host = '127.0.0.1'
port = 1024

s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)

s.bind((host,port))

data = True

while data:
    data,addr = s.recvfrom(1024)
    if data == b'byte':
        break
    print('Recieve String:',data.decode('utf-8'))
    s.sendto(data,addr)

s.close()